﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyWcfRestLib;
using MyWcfRestLib.Files;
using MyWcfRest.Properties;

namespace MyWcfRest
{
    class Program
    {
        static void Main(string[] args)
        {
            int port = Settings.Default.DefaultServicePort;
            WindowsFirewallHelper.AddPort("LeonPort", port, FirewallProtocol.tcp);
            
            WcfService myService = new FileTransferService(port);
            myService.Start();

            Console.WriteLine("Service is running");
            Console.WriteLine("Press enter to quit...");
            Console.ReadLine();

            myService.Close();

            WindowsFirewallHelper.DeletePort(8231, FirewallProtocol.tcp);

        }
    }
}
